﻿@model HanGu.Entity.MemberInfo
@{
    Layout = null;
    TempData["TitlePic"] = Model.PicPath;//.Replace("_B.", "_S.");
    TempData["ContorlID"] = "Introduction";
    TempData["Remark"] = Model.Introduction;
    TempData["GropName"] = Model.GUID;
    var SexList = ViewData["SexList"] as SelectList;
    var IsMarryList = ViewData["IsMarry"] as SelectList;
    var ProviceList = ViewData["Provice"] as SelectList;
    var CityList = ViewData["City"] as SelectList;
    var NativePlaceList = ViewData["NativePlace"] as SelectList;
    var JobList = ViewData["Job"] as SelectList;
    var TradeList = ViewData["Trade"] as SelectList;
    var InterestList = ViewData["Interest"] as SelectList;
    List<string> InterestArry = new List<string>();
    if (Model.Interest != null)
    { InterestArry.AddRange(Model.Interest.Split(',')); }
    var MemberGrade = ViewData["MemberGrade"] as SelectList;
    var Degree = ViewData["Degree"] as SelectList;
    
}
<script>
        function SelectJobOther(value,obj) {            
            if (value.indexOf("9999") > 0)
            {  $("#@ViewData["CurrentController"]Form #"+obj).show();}
            else
            { $("#@ViewData["CurrentController"]Form #"+obj).hide(); }
        }        
        $(document).ready(function(){
        SelectJobOther("","JobOther");
        SelectJobOther("","TradeOther");
        $("#@ViewData["CurrentController"]Form #Degree").val("@Model.Degree");
        $("#@ViewData["CurrentController"]Form #Grade").val("@Model.Grade");
        $("#@ViewData["CurrentController"]Form #Sex").val("@Model.Sex");
        $("#@ViewData["CurrentController"]Form #IsMarry").val("@Model.IsMarry");
        $("#@ViewData["CurrentController"]Form #Provice").val("@Model.Provice");
        $("#@ViewData["CurrentController"]Form #City").val("@Model.City");
        $("#@ViewData["CurrentController"]Form #NativePlace").val("@Model.NativePlace");
        $("#@ViewData["CurrentController"]Form #Job").val("@Model.Job");
        $("#@ViewData["CurrentController"]Form #Trade").val("@Model.Trade");
        });   
</script>
<div class="pageContent">
    <form method="post" id="@ViewData["CurrentController"]Form" action="admin/@ViewData["CurrentController"]/create" enctype="MULTIPART/FORM-DATA" class="pageForm required-validate"
    onsubmit="return iframeCallback(this, navTabAjaxDone);">
    @Html.ValidationSummary(true)
    <div class="pageFormContent" layouth="56">
        @Html.HiddenFor(model => model.ID)
        @Html.HiddenFor(model => model.GUID)
        @Html.HiddenFor(model => model.Pwd)
        <div class="CreateDiv">
            <div class="LeftDiv">
                <p>
                    <label>
                        标题图片：</label>
                    @Html.HiddenFor(c => c.PicPath)
                    @Html.Partial("uploadify")
                </p>
                <p>
                    <label>
                        积分：</label>
                    @Html.TextBoxFor(model => model.Charge, new { @Readonly = "Readonly" })
                    @Html.ValidationMessageFor(model => model.Charge)
                </p>
                <p>
                    <label>
                        创建时间：</label>
                    @Html.TextBoxFor(model => model.CreateTime, new { @Readonly = "true" })
                    @Html.ValidationMessageFor(model => model.CreateTime)
                </p>
                <p>
                    <label>
                        创建者：</label>
                    @Html.TextBoxFor(model => model.Creator, new { @Readonly = "true" })
                    @Html.ValidationMessageFor(model => model.Creator)
                </p>
                <p>
                    <label>
                        修改时间：</label>
                    @Html.TextBoxFor(model => model.UpdateTime, new { @Readonly = "Readonly" })
                    @Html.ValidationMessageFor(model => model.UpdateTime)
                </p>
                <p>
                    <label>
                        修改者：</label>
                    @Html.TextBoxFor(model => model.Updater, new { @Readonly = "Readonly" })
                    @Html.ValidationMessageFor(model => model.Updater)
                </p>
                <p>
                    <label>
                        是否接收短信：</label>
                    @Html.CheckBox("NoSMS", Model.NoSMS.Value)
                    @Html.ValidationMessageFor(model => model.NoSMS)
                </p>
                <p>
                    <label>
                        是否接收邮件：</label>
                    @Html.CheckBox("NoEmail", Model.NoEmail.Value)
                    @Html.ValidationMessageFor(model => model.NoEmail)
                </p>
            </div>
            <div class="rightDiv">
                <p>
                    <label>
                        学位：</label>
                    @Html.DropDownListFor(model => model.Degree, Degree, new { @class = "required combox" })
                    @Html.ValidationMessageFor(model => model.Degree)
                </p>
                <p>
                    <label>
                        级别：</label>
                    @Html.DropDownListFor(model => model.Grade, MemberGrade, new { @class = "required combox" })
                    @Html.ValidationMessageFor(model => model.Grade)
                </p>
                <p>
                    <label>
                        账号：</label>
                    @Html.TextBoxFor(model => model.UserName, new { @class = "required" })
                    @Html.ValidationMessageFor(model => model.UserName)
                </p>
                <p>
                    <label>
                        真实姓名：</label>
                    @Html.TextBoxFor(model => model.RealName, new { @class = "required" })
                    @Html.ValidationMessageFor(model => model.RealName)
                </p>
                <p>
                    <label>
                        性别：</label>
                    @Html.DropDownListFor(model => model.Sex, SexList, new { @class = "combox" })
                    @Html.ValidationMessageFor(model => model.Sex)
                </p>
                <p>
                    <label>
                        婚姻状况：</label>
                    @Html.DropDownListFor(model => model.IsMarry, IsMarryList, new { @class = "combox" })
                    @Html.ValidationMessageFor(model => model.IsMarry)
                </p>
                <p>
                    <label>
                        手机：</label>
                    @Html.TextBoxFor(model => model.Tel, new { @class = "required Tel" })
                    @Html.ValidationMessageFor(model => model.Tel)
                </p>
                <p>
                    <label>
                        邮箱：</label>
                    @Html.TextBoxFor(model => model.Email, new { @class = "required email" })
                    @Html.ValidationMessageFor(model => model.Email)
                </p>
                <p>
                    <label>
                        证件号码：</label>
                    @Html.TextBoxFor(model => model.CredentialNum, new { @class = "required" })
                    @Html.ValidationMessageFor(model => model.CredentialNum)
                </p>
                <p>
                    <label>
                        所在城市：</label>
                    @Html.DropDownListFor(model => model.Provice, ProviceList, new { @class = "combox", @ref = "City", @refUrl = "admin/Area/GetCitys/{value}" })
                    &nbsp;
                    @Html.DropDownListFor(model => model.City, CityList, new { @class = "combox" })
                </p>
                <p>
                    <label>
                        通讯地址：</label>
                    @Html.TextBoxFor(model => model.Address, new { @class = "" })
                    @Html.ValidationMessageFor(model => model.Address)
                </p>
                <p>
                    <label>
                        邮编：</label>
                    @Html.TextBoxFor(model => model.Zip, new { @class = "" })
                    @Html.ValidationMessageFor(model => model.Zip)
                </p>
                <p>
                    <label>
                        籍贯：</label>
                    @Html.DropDownListFor(model => model.NativePlace, NativePlaceList, new { @class = "combox" })
                    @Html.ValidationMessageFor(model => model.NativePlace)
                </p>
                <p style="width: 500px">
                    <label>
                        职业：</label>
                    @Html.DropDownListFor(model => model.Job, JobList, new { @class = "combox", @onchange = "SelectJobOther(this.value,'JobOther')" })
                    @Html.TextBoxFor(model => model.JobOther, new { @class = "" })
                    @Html.ValidationMessageFor(model => model.NativePlace)
                </p>
                <p>
                    <label>
                        工作单位：</label>
                    @Html.TextBoxFor(model => model.WorkAddress, new { @class = "" })
                    @Html.ValidationMessageFor(model => model.WorkAddress)
                </p>
                <p style="width: 500px">
                    <label>
                        所属行业：</label>
                    @Html.DropDownListFor(model => model.Trade, TradeList, new { @class = "combox", @onchange = "SelectJobOther(this.value,'TradeOther')" })
                    @Html.TextBoxFor(model => model.TradeOther, new { @class = "" })
                    @Html.ValidationMessageFor(model => model.Trade)
                </p>
                <p>
                    <label>
                        职位：</label>
                    @Html.TextBoxFor(model => model.Position, new { @class = "" })
                    @Html.ValidationMessageFor(model => model.Position)
                </p>
                <p>
                    <label>
                        兴趣点：</label>
                    @foreach (var item in InterestList)
                    {

                       @* @Html.CheckBox("Interest", InterestArry.Contains(item.Value), new { @class = "checkbox", Value = item.Value, @style = "magin-left:5px" });*@
                        <input name="Interest" class="checkbox" id="Interest" style="magin-left: 5px;" type="checkbox" CHECKED="@InterestArry.Contains(item.Value)" value="@item.Value"/>
                        @item.Text;

                    }
                    @Html.ValidationMessageFor(model => model.Interest)
                </p>
                <p style="height: 70px">
                    <label>
                        关联会员：</label>
                    @Html.TextAreaFor(model => model.RelationMem, new { @class = "", cols = "18", rows = "3" })
                    @Html.ValidationMessageFor(model => model.RelationMem)
                </p>
            </div>
        </div>
        <div>
            <p style="width: 90%; height: 220px">
                <label>
                    简介：</label>
                @Html.TextAreaFor(model => model.Introduction, new { @class = "TextArea", cols = "100", rows = "10" })
                @Html.ValidationMessageFor(model => model.Introduction)
            </p>
        </div>
    </div>
    <div class="formBar">
        <ul>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit">
                            提交</button></div>
                </div>
            </li>
            <li>
                <div class="button">
                    <div class="buttonContent">
                        <button type="button" class="close">
                            取消</button></div>
                </div>
            </li>
        </ul>
    </div>
    </form>
</div>
